\hypertarget{_trace_debug_8h}{\section{libemb/inc/\+Trace\+Debug.h 文件参考}
\label{_trace_debug_8h}\index{libemb/inc/\+Trace\+Debug.\+h@{libemb/inc/\+Trace\+Debug.\+h}}
}
{\ttfamily \#include \char`\"{}Debug\+Print.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Logger.\+h\char`\"{}}\\*
{\ttfamily \#include $<$typeinfo$>$}\\*
{\ttfamily \#include $<$stdio.\+h$>$}\\*
{\ttfamily \#include $<$errno.\+h$>$}\\*
{\ttfamily \#include $<$string.\+h$>$}\\*
\subsection*{宏定义}
\begin{DoxyCompactItemize}
\item 
\hypertarget{_trace_debug_8h_a62420dbbc94ba1b4b958b29002e5b48e}{\#define {\bfseries \+\_\+\+\_\+\+T\+R\+A\+C\+E\+E\+\_\+\+H\+\_\+\+\_\+}}\label{_trace_debug_8h_a62420dbbc94ba1b4b958b29002e5b48e}

\item 
\#define \hyperlink{_trace_debug_8h_a5422f14baad99dde95961762e2d6fe84}{T\+R\+A\+C\+E\+\_\+\+R\+E\+D}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a69666523fbc7f83c8119c8bd918ba633}{D\+E\+B\+U\+G\+\_\+\+R\+E\+L},\char`\"{}\textbackslash{}033\mbox{[}31m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)
\item 
\hypertarget{_trace_debug_8h_a3ef1c2463df9f451fa4fa23965b285da}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+G\+R\+E\+E\+N}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a69666523fbc7f83c8119c8bd918ba633}{D\+E\+B\+U\+G\+\_\+\+R\+E\+L},\char`\"{}\textbackslash{}033\mbox{[}32m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_a3ef1c2463df9f451fa4fa23965b285da}

\item 
\hypertarget{_trace_debug_8h_a97ad4abd28373c1afb4d40bddd21e69a}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+Y\+E\+L\+L\+O\+W}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a69666523fbc7f83c8119c8bd918ba633}{D\+E\+B\+U\+G\+\_\+\+R\+E\+L},\char`\"{}\textbackslash{}033\mbox{[}33m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_a97ad4abd28373c1afb4d40bddd21e69a}

\item 
\hypertarget{_trace_debug_8h_ad853a72aab6617f0e304afade3443c4a}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+P\+I\+N\+K}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a69666523fbc7f83c8119c8bd918ba633}{D\+E\+B\+U\+G\+\_\+\+R\+E\+L},\char`\"{}\textbackslash{}033\mbox{[}35m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_ad853a72aab6617f0e304afade3443c4a}

\item 
\hypertarget{_trace_debug_8h_a8f24ee4604980fb3cf4949241b57b460}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+C\+Y\+A\+N}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a69666523fbc7f83c8119c8bd918ba633}{D\+E\+B\+U\+G\+\_\+\+R\+E\+L},\char`\"{}\textbackslash{}033\mbox{[}36m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_a8f24ee4604980fb3cf4949241b57b460}

\item 
\#define \hyperlink{_trace_debug_8h_af50a5804898f1415b45b75b681f5652c}{T\+R\+A\+C\+E\+\_\+\+R\+E\+L}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a69666523fbc7f83c8119c8bd918ba633}{D\+E\+B\+U\+G\+\_\+\+R\+E\+L},fmt,\#\#arg);\}while(0)
\item 
\hypertarget{_trace_debug_8h_a45055f73487be7356876c9e15530e516}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+E\+R\+R}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a653623da09fe4c8356e422b4ce555b70}{D\+E\+B\+U\+G\+\_\+\+E\+R\+R},\char`\"{}\textbackslash{}033\mbox{[}31m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_a45055f73487be7356876c9e15530e516}

\item 
\hypertarget{_trace_debug_8h_a0866d85379e242af8423181e5beb225f}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+W\+A\+R\+N}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_ac9603ba178c9f584ce4ea7f51798e67d}{D\+E\+B\+U\+G\+\_\+\+W\+A\+R\+N},\char`\"{}\textbackslash{}033\mbox{[}33m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_a0866d85379e242af8423181e5beb225f}

\item 
\hypertarget{_trace_debug_8h_a894c4e78e719b0b60aa19c71df0f3f97}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+I\+N\+F\+O}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_a4407b4d6eae3ba7fe9538b1242a7e165}{D\+E\+B\+U\+G\+\_\+\+I\+N\+F\+O},\char`\"{}\textbackslash{}033\mbox{[}32m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_a894c4e78e719b0b60aa19c71df0f3f97}

\item 
\hypertarget{_trace_debug_8h_aff51baeca94407cfe34c6585a4f91902}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+D\+E\+B\+U\+G}(fmt, arg...)~do\{\hyperlink{_debug_print_8h_a8e71fdf20a907f276afc501175391df9}{Debug\+Print}(\hyperlink{_debug_print_8h_ab8344533c285367480d3b101df197a01}{D\+E\+B\+U\+G\+\_\+\+D\+B\+G},\char`\"{}\textbackslash{}033\mbox{[}36m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}\label{_trace_debug_8h_aff51baeca94407cfe34c6585a4f91902}

\item 
\#define \hyperlink{_trace_debug_8h_a27f13c8c76782f4526adac323c33ad7e}{T\+R\+A\+C\+E\+\_\+\+H\+E\+X}(tag, buf, len)~do\{\hyperlink{_debug_print_8h_a2d67ad9fd673f5b60534fadc138c61eb}{Debug\+Print\+Hex}(\hyperlink{_debug_print_8h_ab8344533c285367480d3b101df197a01}{D\+E\+B\+U\+G\+\_\+\+D\+B\+G}, tag, buf, len);\}while(0)
\item 
\#define \hyperlink{_trace_debug_8h_a4e6780a0fe1a9152feffadfedcee8756}{T\+R\+A\+C\+E\+\_\+\+L\+O\+G}(fmt, arg...)
\item 
\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+T\+E\+X\+T}(fmt, arg...)
\item 
\#define \hyperlink{_trace_debug_8h_a289a5fa1d3eee2899a64a9854061ab06}{C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R}~(\&(typeid($\ast$this).name()\mbox{[}1\mbox{]}))
\item 
\hypertarget{_trace_debug_8h_a59e2b8237c376767dde38a037b7ae92e}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+R\+E\+L\+\_\+\+C\+L\+A\+S\+S}(fmt, arg...)~\{\hyperlink{_trace_debug_8h_af50a5804898f1415b45b75b681f5652c}{T\+R\+A\+C\+E\+\_\+\+R\+E\+L}(\char`\"{}\mbox{[}\%-\/16s\mbox{]}\char`\"{}fmt,\+C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R,\#\#arg);\}}\label{_trace_debug_8h_a59e2b8237c376767dde38a037b7ae92e}

\item 
\hypertarget{_trace_debug_8h_afc210794b4b204fc34850d740983fe60}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+E\+R\+R\+\_\+\+C\+L\+A\+S\+S}(fmt, arg...)~\{T\+R\+A\+C\+E\+\_\+\+E\+R\+R(\char`\"{}\mbox{[}\%-\/16s\mbox{]}$<$\+E\+R\+R\+O\+R@\%s,\+L\%d$>$\+:\char`\"{}fmt,\+C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R,\+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+,\#\#arg);\}}\label{_trace_debug_8h_afc210794b4b204fc34850d740983fe60}

\item 
\hypertarget{_trace_debug_8h_a024d38ac4da813c9bef2afd222478377}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+W\+A\+R\+N\+\_\+\+C\+L\+A\+S\+S}(fmt, arg...)~\{T\+R\+A\+C\+E\+\_\+\+W\+A\+R\+N(\char`\"{}\mbox{[}\%-\/16s\mbox{]}$<$\+W\+A\+R\+N @\%s,\+L\%d$>$\+:\char`\"{}fmt,\+C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R,\+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+,\#\#arg);\}}\label{_trace_debug_8h_a024d38ac4da813c9bef2afd222478377}

\item 
\hypertarget{_trace_debug_8h_aec4d1990b387643d1b162ae8c4b4f2d1}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+I\+N\+F\+O\+\_\+\+C\+L\+A\+S\+S}(fmt, arg...)~\{T\+R\+A\+C\+E\+\_\+\+I\+N\+F\+O(\char`\"{}\mbox{[}\%-\/16s\mbox{]}$<$\+I\+N\+F\+O @\%s,\+L\%d$>$\+:\char`\"{}fmt,\+C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R,\+\_\+\+\_\+\+F\+U\+N\+C\+T\+I\+O\+N\+\_\+\+\_\+,\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+,\#\#arg);\}}\label{_trace_debug_8h_aec4d1990b387643d1b162ae8c4b4f2d1}

\item 
\hypertarget{_trace_debug_8h_a7c9d0aba1bdcc0f3ee21abca85b75dca}{\#define {\bfseries T\+R\+A\+C\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+C\+L\+A\+S\+S}(fmt, arg...)~\{T\+R\+A\+C\+E\+\_\+\+D\+E\+B\+U\+G(\char`\"{}\mbox{[}\%-\/16s\mbox{]}$<$\+D\+E\+B\+U\+G$>$\+:\char`\"{}fmt,\+C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R,\#\#arg);\}}\label{_trace_debug_8h_a7c9d0aba1bdcc0f3ee21abca85b75dca}

\item 
\#define \hyperlink{_trace_debug_8h_aa4b6b88f748ede3d9a7d1c4c8834d048}{T\+R\+A\+C\+E\+\_\+\+L\+O\+G\+\_\+\+C\+L\+A\+S\+S}(fmt, arg...)
\item 
\#define \hyperlink{_trace_debug_8h_aafb785ddac3a16af13fc903fc54643e6}{E\+R\+R\+O\+R\+\_\+\+S\+T\+R\+I\+N\+G}~(strerror(errno))
\end{DoxyCompactItemize}


\subsection{宏定义说明}
\hypertarget{_trace_debug_8h_a289a5fa1d3eee2899a64a9854061ab06}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R@{C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R}}
\index{C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R@{C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\+L\+A\+S\+S\+N\+A\+M\+E\+\_\+\+S\+T\+R~(\&(typeid($\ast$this).name()\mbox{[}1\mbox{]}))}}\label{_trace_debug_8h_a289a5fa1d3eee2899a64a9854061ab06}
下面宏实现可以打印出类名的级别打印(仅在\+C++类中可使用,需要this指针) \hypertarget{_trace_debug_8h_aafb785ddac3a16af13fc903fc54643e6}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!E\+R\+R\+O\+R\+\_\+\+S\+T\+R\+I\+N\+G@{E\+R\+R\+O\+R\+\_\+\+S\+T\+R\+I\+N\+G}}
\index{E\+R\+R\+O\+R\+\_\+\+S\+T\+R\+I\+N\+G@{E\+R\+R\+O\+R\+\_\+\+S\+T\+R\+I\+N\+G}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{E\+R\+R\+O\+R\+\_\+\+S\+T\+R\+I\+N\+G}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+R\+R\+O\+R\+\_\+\+S\+T\+R\+I\+N\+G~(strerror(errno))}}\label{_trace_debug_8h_aafb785ddac3a16af13fc903fc54643e6}
linux标准错误字串 \hypertarget{_trace_debug_8h_a27f13c8c76782f4526adac323c33ad7e}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!T\+R\+A\+C\+E\+\_\+\+H\+E\+X@{T\+R\+A\+C\+E\+\_\+\+H\+E\+X}}
\index{T\+R\+A\+C\+E\+\_\+\+H\+E\+X@{T\+R\+A\+C\+E\+\_\+\+H\+E\+X}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{T\+R\+A\+C\+E\+\_\+\+H\+E\+X}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\+R\+A\+C\+E\+\_\+\+H\+E\+X(
\begin{DoxyParamCaption}
\item[{}]{tag, }
\item[{}]{buf, }
\item[{}]{len}
\end{DoxyParamCaption}
)~do\{{\bf Debug\+Print\+Hex}({\bf D\+E\+B\+U\+G\+\_\+\+D\+B\+G}, tag, buf, len);\}while(0)}}\label{_trace_debug_8h_a27f13c8c76782f4526adac323c33ad7e}
打印16进制字串 \hypertarget{_trace_debug_8h_a4e6780a0fe1a9152feffadfedcee8756}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!T\+R\+A\+C\+E\+\_\+\+L\+O\+G@{T\+R\+A\+C\+E\+\_\+\+L\+O\+G}}
\index{T\+R\+A\+C\+E\+\_\+\+L\+O\+G@{T\+R\+A\+C\+E\+\_\+\+L\+O\+G}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{T\+R\+A\+C\+E\+\_\+\+L\+O\+G}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\+R\+A\+C\+E\+\_\+\+L\+O\+G(
\begin{DoxyParamCaption}
\item[{}]{fmt, }
\item[{}]{arg...}
\end{DoxyParamCaption}
)}}\label{_trace_debug_8h_a4e6780a0fe1a9152feffadfedcee8756}
{\bfseries 值\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do}\{\hyperlink{class_logger_a9ddfac0640ed92ac153f7e24f6134bcb}{Logger::getInstance}()->\hyperlink{class_logger_a4e63cbc1d6d8f374afe1d3e12b5f5842}{log}(\textcolor{stringliteral}{"<@%s,L%d>"}fmt,\_\_FILE\_\_,\_\_LINE\_\_,##arg);\(\backslash\)
                                       TRACE\_PINK(\textcolor{stringliteral}{"[LOG  ]<@%s,L%d>:"}fmt,\_\_FUNCTION\_\_,\_\_LINE\_\_,##arg);\}\textcolor{keywordflow}{
      while}(0)
\end{DoxyCode}
日志信息打印(用在\+C中) \hypertarget{_trace_debug_8h_aa4b6b88f748ede3d9a7d1c4c8834d048}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!T\+R\+A\+C\+E\+\_\+\+L\+O\+G\+\_\+\+C\+L\+A\+S\+S@{T\+R\+A\+C\+E\+\_\+\+L\+O\+G\+\_\+\+C\+L\+A\+S\+S}}
\index{T\+R\+A\+C\+E\+\_\+\+L\+O\+G\+\_\+\+C\+L\+A\+S\+S@{T\+R\+A\+C\+E\+\_\+\+L\+O\+G\+\_\+\+C\+L\+A\+S\+S}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{T\+R\+A\+C\+E\+\_\+\+L\+O\+G\+\_\+\+C\+L\+A\+S\+S}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\+R\+A\+C\+E\+\_\+\+L\+O\+G\+\_\+\+C\+L\+A\+S\+S(
\begin{DoxyParamCaption}
\item[{}]{fmt, }
\item[{}]{arg...}
\end{DoxyParamCaption}
)}}\label{_trace_debug_8h_aa4b6b88f748ede3d9a7d1c4c8834d048}
{\bfseries 值\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do}\{\hyperlink{class_logger_a9ddfac0640ed92ac153f7e24f6134bcb}{Logger::getInstance}()->\hyperlink{class_logger_a4e63cbc1d6d8f374afe1d3e12b5f5842}{log}(\textcolor{stringliteral}{"<@%s::%s,L%d>"}fmt,
      \hyperlink{_trace_debug_8h_a289a5fa1d3eee2899a64a9854061ab06}{CLASSNAME\_STR},\_\_FUNCTION\_\_,\_\_LINE\_\_,##arg);\(\backslash\)
                                             TRACE\_PINK(\textcolor{stringliteral}{"[LOG  ]<@%s,L%d>:"}fmt,\_\_FUNCTION\_\_,\_\_LINE\_\_,##arg)
      ;\}\textcolor{keywordflow}{while}(0)
\end{DoxyCode}
日志信息打印(用在\+C++中) \hypertarget{_trace_debug_8h_a5422f14baad99dde95961762e2d6fe84}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!T\+R\+A\+C\+E\+\_\+\+R\+E\+D@{T\+R\+A\+C\+E\+\_\+\+R\+E\+D}}
\index{T\+R\+A\+C\+E\+\_\+\+R\+E\+D@{T\+R\+A\+C\+E\+\_\+\+R\+E\+D}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{T\+R\+A\+C\+E\+\_\+\+R\+E\+D}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\+R\+A\+C\+E\+\_\+\+R\+E\+D(
\begin{DoxyParamCaption}
\item[{}]{fmt, }
\item[{}]{arg...}
\end{DoxyParamCaption}
)~do\{{\bf Debug\+Print}({\bf D\+E\+B\+U\+G\+\_\+\+R\+E\+L},\char`\"{}\textbackslash{}033\mbox{[}31m\textbackslash{}033\mbox{[}1m\char`\"{}fmt\char`\"{}\textbackslash{}033\mbox{[}0m\char`\"{},\#\#arg);\}while(0)}}\label{_trace_debug_8h_a5422f14baad99dde95961762e2d6fe84}
颜色打印 \hypertarget{_trace_debug_8h_af50a5804898f1415b45b75b681f5652c}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!T\+R\+A\+C\+E\+\_\+\+R\+E\+L@{T\+R\+A\+C\+E\+\_\+\+R\+E\+L}}
\index{T\+R\+A\+C\+E\+\_\+\+R\+E\+L@{T\+R\+A\+C\+E\+\_\+\+R\+E\+L}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{T\+R\+A\+C\+E\+\_\+\+R\+E\+L}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\+R\+A\+C\+E\+\_\+\+R\+E\+L(
\begin{DoxyParamCaption}
\item[{}]{fmt, }
\item[{}]{arg...}
\end{DoxyParamCaption}
)~do\{{\bf Debug\+Print}({\bf D\+E\+B\+U\+G\+\_\+\+R\+E\+L},fmt,\#\#arg);\}while(0)}}\label{_trace_debug_8h_af50a5804898f1415b45b75b681f5652c}
下面宏实现可以根据信息类型分颜色打印 \hypertarget{_trace_debug_8h_a2b25a234ac5293cabc05ac2fca2c8e80}{\index{Trace\+Debug.\+h@{Trace\+Debug.\+h}!T\+R\+A\+C\+E\+\_\+\+T\+E\+X\+T@{T\+R\+A\+C\+E\+\_\+\+T\+E\+X\+T}}
\index{T\+R\+A\+C\+E\+\_\+\+T\+E\+X\+T@{T\+R\+A\+C\+E\+\_\+\+T\+E\+X\+T}!Trace\+Debug.\+h@{Trace\+Debug.\+h}}
\subsubsection[{T\+R\+A\+C\+E\+\_\+\+T\+E\+X\+T}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\+R\+A\+C\+E\+\_\+\+T\+E\+X\+T(
\begin{DoxyParamCaption}
\item[{}]{fmt, }
\item[{}]{arg...}
\end{DoxyParamCaption}
)}}\label{_trace_debug_8h_a2b25a234ac5293cabc05ac2fca2c8e80}
{\bfseries 值\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do}\{\textcolor{keywordflow}{if}(\hyperlink{_debug_print_8h_acb8daaa78864379813a74092d959ccb0}{DebugPrintLevel}()==\hyperlink{_debug_print_8h_ab8344533c285367480d3b101df197a01}{DEBUG\_DBG})\{\(\backslash\)
                                            TRACE\_CYAN(\textcolor{stringliteral}{"----------------------------------------\(\backslash\)n"});\(\backslash\)
                                            printf(fmt,arg);\(\backslash\)
                                            TRACE\_CYAN(\textcolor{stringliteral}{"\(\backslash\)n----------------------------------------\(\backslash\)n"});\(\backslash\)
                                            \}\}\textcolor{keywordflow}{while}(0)
\end{DoxyCode}
